﻿using SqlSugar;

namespace SugarDemo.Model
{
    [SugarTable("student")]
    public class StudentModel
    {
        [SugarColumn(ColumnName = "student_id", IsPrimaryKey = true, IsIdentity = true)]
        public int StudentId { get; set; }

        [SugarColumn(ColumnName = "shool_id")]
        public int SchoolId { get; set; }

        [SugarColumn(ColumnName = "name", Length = 32, ColumnDataType = "varchar")]
        public string Name { get; set; }

        [SugarColumn(ColumnName = "hobbies", ColumnDataType = "json", IsJson = true, IsNullable = true)]
        public List<string> Hobbies { get; set; }
        [SugarColumn(IsIgnore = true)]

        public string SchoolName { get; set; }
    }
}
